{extend name="layout:default" /}
{block name="title"}活动详情{/block}
{block name="content"}
<div class="row">
    <div class="col-xs-12">
        <div class="box">
            <div class="box-header">
                <h3 class="box-title">活动信息</h3>
                <div class="box-tools">
                    <a href="{:url('index')}" class="btn btn-info"> 返回 </a>
                </div>
            </div>
            <!-- /.box-header -->
            <div class="box-body table-responsive no-padding">
                <table class="table table-hover">
                    <caption>活动详情</caption>
                    <tbody>
                    <tr><th>活动标题</th><td>{$activity.title}</td></tr>
                    <tr><th>简介</th><td>{$activity.introduction}</td></tr>
                    <tr><th>活动图片</th><td><img src="{$activity.thumb}" alt="" width="200"></td></tr>
                    <tr><th>活动内容</th><td>{$activity.content}</td></tr>
                    <tr><th>所属分类</th><td>{$activity.category_id}</td></tr>
                    <tr><th>所属类别</th><td>{$activity.class_ids}</td></tr>
                    <tr><th>限制人数</th><td>{$activity.people_num}人</td></tr>
                    <tr><th>是否放置主页</th><td>{$activity.is_home === 1 ? '<span class="glyphicon glyphicon-ok" style="color: green"></span>' :
                        '<span class="glyphicon glyphicon-remove" style="color: red"></span>'}</td></tr>
                    <tr><th>是否最新</th><td>{$activity.is_new === 1 ? '<span class="glyphicon glyphicon-ok" style="color: green"></span>' :
                        '<span class="glyphicon glyphicon-remove" style="color: red"></span>'}</td></tr>
                    <tr><th>是否最热</th><td>{$activity.is_hot === 1 ? '<span class="glyphicon glyphicon-ok" style="color: green"></span>' :
                        '<span class="glyphicon glyphicon-remove" style="color: red"></span>'}</td></tr>
                    <tr><th>状态</th><td>{$activity.status === 1 ? '正常' : '禁用'}</td></tr>
                    <tr><th>开始时间</th><td>{:date('Y-m-d H:i:s',$activity.start_time)}</td></tr>
                    <tr><th>结束时间</th><td>{:date('Y-m-d H:i:s',$activity.end_time)}</td></tr>

                    {if $activity.class_ids === 3}
                    <form action="{:url('edit',['id'=>$activity.id])}" class="form-horizontal" method="post" enctype="multipart/form-data">
                        <tr><th>绑定课程id</th><td><input type="text" value="{$activity.course_id}" name="course_id"></td></tr>
                        <tr><th>绑定新闻id</th><td><input type="text" value="{$activity.news_id}" name="news_id"></td></tr>
                        <tr><th colspan="2"><input type="submit" value="提交" class="btn btn-info"></th></tr>
                    </form>
                    {/if}


                    </tbody>
                </table>
            </div>
            <!-- /.box-body -->
        </div>
        <!-- /.box -->
    </div>
</div>
{/block}